package com.zplus.managers.petservices.services;


import com.zplus.managers.petservices.entities.AdoptRequest;
import com.zplus.managers.petservices.entities.Pet;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 *  宠物相关的服务
 */
public interface PetService
{

    /**
     * @brief add a new pet -- admin only
     * @param pet new pet object
     * @return true - if success, false otherwise
     */
    boolean newPet(Pet pet);

    /**
     *  query all pets
     * @return a list contains all pets
     */
    List<Pet> queryPets(PetState state);

    /**
     * query pet by id
     * @param id specific id
     * @return pet object if success, null otherwise
     */
    Pet queryPetById(int id);

    /**
     * update pet info
     * @param petAft the updated pet object
     * @return true - if success, false otherwise
     */
    boolean updatePetInfo( Pet petAft);


    /**
     * delete a pet
     * @param pet target
     * @return true if success, false otherwise
     */

    boolean deletePet(Pet pet);

    /**
     * get all pets that belong to given species;
     * @param speci given species;
     * @return list of target pets, null otherwise
     */
    List<Pet> getPetsBySpeci(String speci);
}
